]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
build: Add soup2 option
authorFlorian Müllner <fmuellner@gnome.org>
Sun, 29 Aug 2021 12:24:42 +0000 (14:24 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Wed, 1 Sep 2021 10:26:15 +0000 (12:26 +0200)
!1940 added support for soup 3, including a fallback to soup 2.4
where the newer version isn't available.

Unfortunately it missed that libgweather has a hidden soup dependency,
and now gnome-shell fails to start if a weather location has been set
up and soup 3 is available.

We don't have a good way to detect that case, so hide the soup 3 support
behind a build option. Distributors are expected to switch it at the
same time as libgweather.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1966>

js/misc/config.js.in
js/misc/meson.build
js/ui/environment.js
meson.build
meson_options.txt

index e54e280441d96938bada80f07156f1be8c65716a..f9210397a120dfd4588e6c99fd864d9edccffecc 100644 (file)
@@ -8,6 +8,8 @@ var PACKAGE_VERSION = '@PACKAGE_VERSION@';
 var HAVE_BLUETOOTH = @HAVE_BLUETOOTH@;
 /* 1 if networkmanager is available, 0 otherwise */
 var HAVE_NETWORKMANAGER = @HAVE_NETWORKMANAGER@;
+/* 1 if soup3 support is enabled, 0 otherwise */
+var HAVE_SOUP2 = @HAVE_SOUP2@;
 /* gettext package */
 var GETTEXT_PACKAGE = '@GETTEXT_PACKAGE@';
 /* locale dir */
index 2702c3dbc9cf5d3bcf3c148bdc6265f589b174d2..582562711149e2b987b4a8b438fc15c523e8299d 100644 (file)
@@ -5,6 +5,7 @@ jsconf.set('GETTEXT_PACKAGE', meson.project_name())
 jsconf.set('LIBMUTTER_API_VERSION', mutter_api_version)
 jsconf.set10('HAVE_BLUETOOTH', bt_dep.found())
 jsconf.set10('HAVE_NETWORKMANAGER', have_networkmanager)
+jsconf.set10('HAVE_SOUP2', have_soup2)
 jsconf.set('datadir', datadir)
 jsconf.set('libexecdir', libexecdir)
 
index bd372ce26a5f3e2a2346b42b1b050a86c8c64312..89ff701c70532a632f9e3af7e1b484d3ff70b12d 100644 (file)
@@ -12,6 +12,8 @@ imports.gi.versions.TelepathyGLib = '0.12';
 imports.gi.versions.TelepathyLogger = '0.2';
 
 try {
+    if (Config.HAVE_SOUP2)
+        throw new Error('Soup3 support not enabled');
     const Soup_ = imports.gi.Soup;
 } catch (e) {
     imports.gi.versions.Soup = '2.4';
index 5e9053558d8cb39d6c3dd59564cd05efa3f15f92..58475005130d5f533c6589f6b13d06afab826c89 100644 (file)
@@ -128,6 +128,8 @@ else
   have_systemd = false
 endif
 
+have_soup2 = get_option('soup2')
+
 if get_option('man')
   if fs.exists('man/gnome-shell.1')
     install_man('man/gnome-shell.1')
index ef76b73c3475b1afa0efdeed6c38db0a4da66ff6..be9aa21f36c28cdd9178b69a7da889629fe97b1e 100644 (file)
@@ -33,3 +33,9 @@ option('systemd',
   value: true,
   description: 'Enable systemd integration'
 )
+
+option('soup2',
+  type: 'boolean',
+  value: true,
+  description: 'Use Soup 2.4 instead of Soup 3. Must be in sync with libgweather'
+)